#include "detectthread.h"

DetectThread::DetectThread(QObject *parent ): QThread(parent) {}

void DetectThread::stop()
{
    STOP = true;
    qDebug()<<"DetectThread::stop";
}
void DetectThread::run() {
    this->before_running();
    this->do_detect();
    this->after_running();
}


void DetectThread::before_running()
{
    ID = this->get_detect_id();
    STOP = false;
    //cur_thread = this;
}

void DetectThread::after_running()
{
    ID = 0;                // 重置ID未0，表示没有线程在检测
    STOP = true;		     // 停止检测

}

void DetectThread::clear()
{
}
